<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateTableWangguiDotWaimaiEstimate extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wanggui_dot_waimai_estimate', function (Blueprint $table) {
            $table->id();
            $table->string('orderNo', 32)->default('')->comment('订单号（标识）');
            $table->decimal('lng', 10, 7)->default(0)->comment('经度');
            $table->decimal('lat', 10, 7)->default(0)->comment('纬度');
            $table->string('doublePlatformSales', 20)->default('')->comment('双平台外卖销量预估(单)');
            $table->string('doublePlatformInCome', 20)->default('')->comment('双平台外卖实收预估(元)');
            $table->string('mtSales', 20)->default('')->comment('双平台外卖实收预估(单)');
            $table->string('elmSales', 20)->default('')->comment('双平台外卖实收预估(单)');
            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '网规点位沙盘预估 默认3km';

            $table->index('orderNo', 'idx_orderNo');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wanggui_dot_waimai_estimate');
    }
}
